<!-- $Id: goods_list.htm 17126 2010-04-23 10:30:26Z liuhui $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ECSHOP 管理中心 - 商品列表 </title>
<base href="__ROOT__/admin/" />
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="styles/general.css" rel="stylesheet" type="text/css">
<link href="styles/main.css" rel="stylesheet" type="text/css">

<style>
  .panel-icloud .panel-right iframe {
    height: 300px;
    margin-top: 15px;
  }
  .panel-hint{
    top: 0%;
  }
</style>
<script src="__ROOT__/admin/js/jquery-2.1.4.min.js"></script>
<script>
<!--
// 这里把JS用到的所有语言都赋值到这里
var process_request = "正在处理您的请求...";
var todolist_caption = "记事本";
var todolist_autosave = "自动保存";
var todolist_save = "保存";
var todolist_clear = "清除";
var todolist_confirm_save = "是否将更改保存到记事本？";
var todolist_confirm_clear = "是否清空内容？";
var goods_name_not_null = "商品名称不能为空。";
var goods_cat_not_null = "商品分类必须选择。";
var category_cat_not_null = "分类名称不能为空";
var brand_cat_not_null = "品牌名称不能为空";
var goods_cat_not_leaf = "您选择的商品分类不是底级分类，请选择底级分类。";
var shop_price_not_null = "本店售价不能为空。";
var shop_price_not_number = "本店售价不是数值。";
var select_please = "请选择...";
var button_add = "添加";
var button_del = "删除";
var spec_value_not_null = "规格不能为空";
var spec_price_not_number = "加价不是数字";
var market_price_not_number = "市场价格不是数字";
var goods_number_not_int = "商品库存不是整数";
var warn_number_not_int = "库存警告不是整数";
var promote_not_lt = "促销开始日期不能大于结束日期";
var promote_start_not_null = "促销开始时间不能为空";
var promote_end_not_null = "促销结束时间不能为空";
var drop_img_confirm = "您确实要删除该图片吗？";
var batch_no_on_sale = "您确实要将选定的商品下架吗？";
var batch_trash_confirm = "您确实要把选中的商品放入回收站吗？";
var go_category_page = "本页数据将丢失，确认要去商品分类页添加分类吗？";
var go_brand_page = "本页数据将丢失，确认要去商品品牌页添加品牌吗？";
var volume_num_not_null = "请输入优惠数量";
var volume_num_not_number = "优惠数量不是数字";
var volume_price_not_null = "请输入优惠价格";
var volume_price_not_number = "优惠价格不是数字";
var cancel_color = "无样式";
//-->
/*关闭按钮*/
  function get_certificate(){
    var panel = document.getElementById('panelCloud');
    var mask  = document.getElementById('CMask')||null;
    var frame = document.getElementById('CFrame');
    if(panel&&CMask&&frame){
        panel.style.display = 'block';
        mask.style.display = 'block';
        frame.src = 'https://openapi.shopex.cn/oauth/authorize?response_type=code&client_id=yogfss4l&redirect_uri=http%3A%2F%2Flocalhost%2Fdayi%2Fecshop%2Fecshop%2Fadmin%2Fcertificate.php%3Fact%3Dget_certificate%26type%3Dindex&view=auth_ecshop';
      }
  }

  /*关闭按钮*/
  function btnCancel(item){
    var par  = item.offsetParent;
    var mask  = document.getElementById('CMask')||null;
    var frame = document.getElementById('CFrame');
    par.style.display = 'none';
    if(mask){mask.style.display = 'none';}
    frame.src = '';
  }
</script>
</head>
<body>
<!--云起激活系统面板-->
<div class="panel-hint panel-icloud" id="panelCloud">
  <div class="panel-cross"><span onclick="btnCancel(this)">Ｘ</span></div>
  <div class="panel-title">
    <span class="tit">您需要激活系统</span>
    <p>用云起账号激活您的系统，享受物流查询，天工收银，手机短信等更多应用和服务</p>
  </div>
  <div class="panel-left">
    <span>没有云起账号吗？</span>
    <p>点击下列按钮一步完成注册激活！</p>
    <a href="https://account.shopex.cn/reg?refer=yunqi_ecshop" target="_blank" class="btn btn-yellow">免费注册云起账号</a>
  </div>
  <div class="panel-right">
    <h5 class="logo">云起</h5>
    <p>正在激活中</p>
    <iframe src="goods.html" id="CFrame" frameborder="0"></iframe>
    <div class="cloud-passw">
      <a target="_blank" href="https://account.shopex.cn/forget?">忘记密码？</a>
    </div>
  </div>
</div>
<!--云起激活系统面板-->
<!--遮罩-->
<div class="mask-black" id="CMask"></div>
<!--遮罩-->
<h1>
      <a href="{:url('Goods/addgoods')}" class="btn btn-right btn-add-goods">添加新商品</a>
  <a class="btn btn-right" href="http://yunqi.shopex.cn/products/huodiantong" target="_blank">快速录入商品</a>
  
    <span class="action-span1"><a href="http://localhost/dayi/ecshop/ecshop/admin/index.php?act=main">ECSHOP 管理中心</a> </span><span id="search_id" class="action-span1">&nbsp;&nbsp;&gt;&nbsp;&nbsp;商品列表 </span>
  <div style="clear:both"></div>
</h1><script type="text/javascript" src="images/utils.js"></script><script type="text/javascript" src="images/listtable.js"></script>
<!-- 商品搜索 -->
<!-- $Id: goods_search.htm 16790 2009-11-10 08:56:15Z wangleisvn $ -->
<div class="form-div">
  <form action="javascript:searchGoods()" name="searchForm">
        <!-- 分类 -->
    商品分类
    <select name="cat_id" id="cat">
    <option value="0" selected="selected">所有分类</option>
            {volist name='cate_list' id='v'}
            <option value="{$v.cat_id}"><?php echo str_repeat("&nbsp;&nbsp;",$v['level']);?>{$v.cat_name}</option>
           {/volist}
    </select>

    <!-- 品牌 -->
    品牌
    <select name="brand_id" id='brand'>
    <option value="0" selected="selected">所有品牌</option>
    {volist name='brand_list' id='v'}
    <option value="{$v.brand_id}">{$v.brand_name}</option>
    {/volist}
    </select>

    <!-- 推荐 -->
   <!--  推荐类别
    <select name="intro_type">
    <option value="0" selected="selected">全部</option>
    <option value="is_best">精品</option>
    <option value="is_new">新品</option><option value="is_hot">热销</option><option value="is_promote">特价</option><option value="all_type">全部推荐</option>
    </select> -->
        
    <!-- 供货商 -->
    供货商
    <select name="provider_id" id='provider'><option value="0" selected="selected">全部</option>
    {volist name='provider' id='v'}
    <option value="{$v.provider_id}">{$v.provider_name}</option>
    {/volist}
    </select>


        <!-- 上架 -->
    <!-- 上架状态
       <select name="ls_on_sale" id="sale">
            <option value="">全部</option>
            <option value="1">上架</option>
            <option value="0">下架</option>
        </select>   -->     <!-- 关键字 -->

    &nbsp;&nbsp; 关键字 <input name="keyword" size="25" type="text" id="con">
    <button type="submit" class="btn"> 搜索 </button>
  </form>
</div>


<script>
  function searchGoods() {

    listTable.filter['cat_id'] = document.forms['searchForm'].elements['cat_id'].value;
    listTable.filter['brand_id'] = document.forms['searchForm'].elements['brand_id'].value;
    listTable.filter['intro_type'] = document.forms['searchForm'].elements['intro_type'].value;
      listTable.filter['suppliers_id'] = document.forms['searchForm'].elements['suppliers_id'].value;
      listTable.filter['Is_on_sale'] = document.forms['searchForm'].elements['Is_on_sale'].value;

    listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
    listTable.filter['page'] = 1;

    listTable.loadList();
  }
</script>
<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
<table cellspacing="1" cellpadding="3">
  <tbody><tr>
    <th class="checks"><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox"></th>
    <th><a href="javascript:listTable.sort('goods_id');">编号</a><img src="images/sort_desc.png"></th>
    <th><a href="javascript:listTable.sort('goods_name');">商品名称</a></th>
    <th><a href="javascript:listTable.sort('goods_sn');">货号</a></th>
    <th><a href="javascript:listTable.sort('shop_price');">价格</a></th>
    <th><a href="javascript:listTable.sort('Is_on_sale');">上架</a></th>
    <th><a href="javascript:listTable.sort('is_best');">精品</a></th>
    <th><a href="javascript:listTable.sort('is_new');">新品</a></th>
    <th><a href="javascript:listTable.sort('is_hot');">热销</a></th>
    <th><a href="javascript:listTable.sort('sort_order');">推荐排序</a></th>
        <th><a href="javascript:listTable.sort('goods_number');">库存</a></th>
        <th><a href="javascript:listTable.sort('virtual_sales');">虚拟销量</a></th>
    <th>操作</th>
  </tr><tr>
    </tr>



<tbody id="goods_list">


   <?php foreach ($arr['list'] as $key => $value) { ?>
    <tr goods_id="{$value.goods_id}">
    <td style="background-color: rgb(255, 255, 255);"><input name="checkboxes[]" value="72" type="checkbox"></td>
    <td style="background-color: rgb(255, 255, 255);">{$value.goods_id}</td>
    <td class="first-cell" style="background-color: rgb(255, 255, 255);"><span onclick="listTable.edit(this, 'edit_goods_name', 72)">{$value.goods_name}</span></td>
    <td style="background-color: rgb(255, 255, 255);"><span onclick="listTable.edit(this, 'edit_goods_sn', 72)">{$value.goods_sn}</span></td>
    <td style="background-color: rgb(255, 255, 255);" align="right"><span onclick="listTable.edit(this, 'edit_goods_price', 72)">{$value.shop_price}</span></td>
    <td style="background-color: rgb(255, 255, 255);" align="center">
    {if condition="$value['Is_on_sale'] eq 1"}
  <img src="images/yes.svg"
      width="20" class="change" Is_on_sale="{$value.Is_on_sale}">
    {else}
   <img src="images/no.svg"
   width="20" class="change"   Is_on_sale="{$value.Is_on_sale}">
    {/if}
    </td>

    <td style="background-color: rgb(255, 255, 255);" align="center">
    {if condition="$value['is_best'] eq 1"}
     <img src="images/yes.svg" width="20" class="best" is_best="{$value.is_best}">
    {else}
   <img src="images/no.svg" width="20" class="best"  is_best="{$value.is_best}">
    {/if}
    </td>

     <td style="background-color: rgb(255, 255, 255);" align="center">
    {if condition="$value['is_new'] eq 1"}
     <img src="images/yes.svg" width="20" class="new" is_new="{$value.is_new}">
    {else}
   <img src="images/no.svg" width="20" class="new" is_new="{$value.is_new}">
    {/if}
    </td>

    <td style="background-color: rgb(255, 255, 255);" align="center">
    {if condition="$value['is_hot'] eq 1"}
     <img src="images/yes.svg" width="20" class="hot" is_hot="{$value.is_hot}">
    {else}
   <img src="images/no.svg" width="20" class="hot" is_hot="{$value.is_hot}">
    {/if}
    </td>

    <td style="background-color: rgb(255, 255, 255);" align="center"><span onclick="listTable.edit(this, 'edit_sort_order', 72)">{$value.sort_order}</span></td>
        <td style="background-color: rgb(255, 255, 255);" align="right"><span onclick="listTable.edit(this, 'edit_goods_number', 72)">{$value.goods_number}</span></td>
        <td style="background-color: rgb(255, 255, 255);" align="center"><span onclick="listTable.edit(this, 'edit_virtual_sales', 72)">{$value.virtual_sales}</span></td>
    <td style="background-color: rgb(255, 255, 255);" align="center">
      <a href="http://localhost/dayi/ecshop/ecshop/goods.php?id=72" target="_blank" title="查看">查看</a>
      <a href="http://localhost/dayi/ecshop/ecshop/admin/goods.php?act=edit&amp;goods_id=72&amp;extension_code=" title="编辑">编辑</a>
      <a href="http://localhost/dayi/ecshop/ecshop/admin/goods.php?act=copy&amp;goods_id=72&amp;extension_code=" title="复制">复制</a>
      <a href="http://www.jodieme.cn/admin/goods/del?goods_id={$value.goods_id}"  title="回收站">回收站</a>
      <img src="images/empty.gif" width="16" height="16" border="0">          </td>
  </tr>
  <?php } ?>

</tbody>
  </tbody></table>
<!-- end goods list -->



<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tbody><tr>
    <td style="text-align: left">
      <input name="act" value="batch" type="hidden">
      <select name="type" id="selAction" onchange="changeAction()">
        <option value="" selected="selected">请选择...</option>
        <option value="trash">回收站</option>
        <option value="on_sale">上架</option>
        <option value="not_on_sale">下架</option>
        <option value="best">精品</option>
        <option value="not_best">取消精品</option>
        <option value="new">新品</option>
        <option value="not_new">取消新品</option>
        <option value="hot">热销</option>
        <option value="not_hot">取消热销</option>
        <option value="move_to">转移到分类</option>
              <option value="suppliers_move_to">转移到供货商</option>
          
      </select>
      <select name="target_cat" style="display:none">
        <option value="0" selected="selected">请选择...</option><option value="26">家用电器</option><option value="27">&nbsp;&nbsp;&nbsp;&nbsp;大家电</option><option value="28">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;平板电脑</option><option value="32">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;冰箱</option><option value="29">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家用空调</option><option value="30">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家电配件</option><option value="31">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;洗衣机</option><option value="25">数码时尚</option><option value="18">智能硬件</option><option value="22">移动电源</option><option value="6">手机</option><option value="9">&nbsp;&nbsp;&nbsp;&nbsp;电池</option><option value="8">&nbsp;&nbsp;&nbsp;&nbsp;耳机</option><option value="19">配件</option><option value="24">&nbsp;&nbsp;&nbsp;&nbsp;数码时尚</option><option value="20">&nbsp;&nbsp;&nbsp;&nbsp;保护壳</option><option value="16">服装</option><option value="12">充值卡</option><option value="1">手机类型</option><option value="3">&nbsp;&nbsp;&nbsp;&nbsp;小型手机</option><option value="4">&nbsp;&nbsp;&nbsp;&nbsp;3G手机</option>      </select>
            <!--二级主菜单：转移供货商-->
      <select name="suppliers_id" style="display:none">
        <option value="-1" selected="selected">请选择...</option>
        <option value="0">转移到网店</option>
                  <option value="1">北京供货商</option>
                  <option value="2">上海供货商</option>
              </select>
      <!--end!-->
        
            <input name="extension_code" value="" type="hidden">
            <button class="btn" type="submit" id="btnSubmit" disabled="true"> 确定 </button>
    </td>

    <td nowrap="true" align="right" class="page">
     <!--$Id: page.htm 14216 2008-03-10 02:27:21Z testyang $-->
  <div id="turn-page">
            <span id="pageCurrent">{$arr.arr.page}</span> / <span id="totalPages">{$arr.arr.last}</span>
            页，每页 <input size="3" id="pageSize" value="{$arr.arr.limit}" onkeypress="return listTable.changePageSize(event)" type="text">
            条记录，总共 <span id="totalRecords">{$arr.arr.num}</span>
            条记录
          <span id="page-link" >
    <a href="javascript:void (0); "page=1>第一页</a>
    <a href="javascript:void (0);" page="{$arr.arr.top}">上一页</a>
    <a href="javascript:void (0)" page="{$arr.arr.down}">下一页</a>
    <a href="javascript:void (0)" page="{$arr.arr.last}">最末页</a>
    <select id="gotoPage" onchange="listTable.gotoPage(this.value)">
      <option value="1" selected="selected">1</option></select>
  </span>
          </div>


    </td>

  </tr>
</tbody></table>


</div>

</form>

<div id="footer">
共执行 8 个查询，用时 0.016487 秒，Gzip 已禁用，内存占用 2.143 MB<br>
版权所有 © 2005-2018 上海商派软件有限公司，并保留所有权利。</div>
<!-- 新订单提示信息 -->
<div id="popMsg">
  <table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#cfdef4">
  <tbody><tr>
    <td style="color: #0f2c8c" width="30" height="24"></td>
    <td style="font-weight: normal; color: #1f336b; padding-top: 4px;padding-left: 4px" width="100%" valign="center"> 新订单通知</td>
    <td style="padding-top: 2px;padding-right:2px" width="19" valign="center" align="right"><span title="关闭" style="cursor: hand;cursor:pointer;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick="Message.close()">×</span><!-- <img title=关闭 style="cursor: hand" onclick=closediv() hspace=3 src="msgclose.jpg"> --></td>
  </tr>
  <tr>
    <td style="padding-right: 1px; padding-bottom: 1px" colspan="3" height="70">
    <div id="popMsgContent">
      <p>您有 <strong style="color:#ff0000" id="spanNewOrder">1</strong> 个新订单以及       <strong style="color:#ff0000" id="spanNewPaid">0</strong> 个新付款的订单</p>
      <p style="word-break:break-all" align="center"><a href="http://localhost/dayi/ecshop/ecshop/admin/order.php?act=list"><span style="color:#ff0000">点击查看新订单</span></a></p>
    </div>
    </td>
  </tr>
  </tbody></table>
</div>

<!--
<embed src="images/online.wav" width="0" height="0" autostart="false" name="msgBeep" id="msgBeep" enablejavascript="true"/>
-->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="msgBeep" width="1" height="1">
  <param name="movie" value="images/online.swf">
  <param name="quality" value="high">
  <embed src="images/online.swf" name="msgBeep" id="msgBeep" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" width="0" height="0">
  
</object>
<!-- <script src="../../../../admin/jquery-3.2.1.js"></script> -->

<script language="JavaScript">
//是否上架
    $(document).on('click','.change',function(){
         var  Is_on_sale=$(this).attr('Is_on_sale');
         var  goods_id=$(this).parents('tr').attr('goods_id');
         var  url="{:url('goods/ajax_change')}";
         var _this=$(this);
         if(Is_on_sale==0)
         {
             Is_on_sale=1;
         }else{
             Is_on_sale=0;
         }
        $.ajax({
            url:"{:url('goods/change_sale')}",
            data:{Is_on_sale:Is_on_sale,goods_id:goods_id},
            dataType:'json',
            type:"get",
            success:function(res){
                if(Is_on_sale==0)
                {
                    _this.attr('src','images/no.svg');
                    _this.attr('Is_on_sale',0);
                }else{
                    _this.attr('src','images/yes.svg');
                    _this.attr('Is_on_sale',1);
                }
                console.log(res)
            }
        })
    })

//是否精品
    $(document).on('click','.best',function(){
      // alert(123)
        var  is_best=$(this).attr('is_best');
        var  goods_id=$(this).parents('tr').attr('goods_id');
        var _this=$(this);
        if(is_best==0)
        {
            is_best=1;
        }else{
            is_best=0;
        }
        $.ajax({
            url:"{:url('goods/change_best')}",
            data:{is_best:is_best,goods_id:goods_id},
            dataType:'json',
            type:"get",
            success:function(res){
                if(is_best==0)
                {
                    _this.attr('src','images/no.svg');
                    _this.attr('is_best',0);
                }else{
                    _this.attr('src','images/yes.svg');
                    _this.attr('is_best',1);
                }
                console.log(res)
            }
        })
    })

    //是否新品
    $(document).on('click','.new',function(){
        var  is_new=$(this).attr('is_new');
        var  goods_id=$(this).parents('tr').attr('goods_id');
        var _this=$(this);
        if(is_new==0)
        {
            is_new=1;
        }else{
            is_new=0;
        }
        $.ajax({
            url:"{:url('goods/change_new')}",
            data:{is_new:is_new,goods_id:goods_id},
            dataType:'json',
            type:"get",
            success:function(res){
                if(is_new==0)
                {
                    _this.attr('src','images/no.svg');
                    _this.attr('is_new',0);
                }else{
                    _this.attr('src','images/yes.svg');
                    _this.attr('is_new',1);
                }
                console.log(res)
            }
        })
    })

    //是否精品
    $(document).on('click','.hot',function(){
        var  is_hot=$(this).attr('is_hot');
        var  goods_id=$(this).parents('tr').attr('goods_id');
        var _this=$(this);
        if(is_hot==0)
        {
            is_hot=1;
        }else{
            is_hot=0;
        }
        $.ajax({
            url:"{:url('goods/change_hot')}",
            data:{is_hot:is_hot,goods_id:goods_id},
            dataType:'json',
            type:"get",
            success:function(res){
                if(is_hot==0)
                {
                    _this.attr('src','images/no.svg');
                    _this.attr('is_hot',0);
                }else{
                    _this.attr('src','images/yes.svg');
                    _this.attr('is_hot',1);
                }
                console.log(res)
            }
        })
    })
//-->
//var data={};
//$(document).on('click','.btn',function () {
//    var con=$('#con').val();
//    data.con=con;
//    aa(data)
//})
    $(document).on('click','#page-link a,.btn',function () {
        var cat=$('#cat').val();
        var brand=$('#brand').val();
        // var sale=$('#sale').val();
        var provider=$('#provider').val();
        var page=$(this).attr('page');
        var con=$('#con').val();
//        data.page=page;
        aa(page,con,cat,brand,provider);
    })
   // onload(aa(page,con))
    function aa(page,con,cat,brand,provider) {
      console.log(con)
        $.ajax({
            url:"{:url('goods/goods')}",
            data:{page:page,con:con,cat:cat,brand:brand,provider:provider},
            type:'get',
            dataType:'json',
            success:function(res)
            {
                console.log(res.list)

                $('#turn-page').html('  <div id="turn-page"><span id="pageCurrent">'+res.arr.page+'</span> / <span id="totalPages">'+res.arr.last+'</span>页，每页 <input size="3" id="pageSize" value="'+res.arr.limit+'" onkeypress="return listTable.changePageSize(event)" type="text">条记录，总共 <span id="totalRecords">'+res.arr.num+'</span>条记录<span id="page-link" ><a href="javascript:void (0); "page=1>第一页</a><a href="javascript:void (0);" page="'+res.arr.top+'">上一页</a><a href="javascript:void (0)" page="'+res.arr.down+'">下一页</a><a href="javascript:void (0)" page="'+res.arr.last+'">最末页</a><select id="gotoPage" onchange="listTable.gotoPage(this.value)"><option value="1" selected="selected">1</option></select></span></div>');


                $('#goods_list').empty();
                $.each(res.list,function(i,v)
                {

                    var tr = $("<tr goods_id="+v.goods_id+"></tr>");
                    tr.append(' <td style="background-color: rgb(255, 255, 255);"><input name="checkboxes[]" value="72" type="checkbox"></td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_id+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_name+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_sn+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.shop_price+'</td>')
                    if(v.Is_on_sale==0){
                        var img_sale = '<img src="images/no.svg"  width="20" class="change" Is_on_sale="'+v.Is_on_sale+'">';
                    }else{
                        var img_sale = '<img src="images/yes.svg"  width="20" class="change" Is_on_sale="'+v.Is_on_sale+'">';
                    }
                    tr.append('<td>'+img_sale+'</td>')
                    if(v.is_best==0){
                        var is_best = '<img src="images/no.svg"  width="20" class="change" is_best="'+v.is_best+'">';
                    }else{
                        var is_best = '<img src="images/yes.svg"  width="20" class="change" is_best="'+v.is_best+'">';
                    }
                    tr.append('<td>'+is_best+'</td>')
                    if(v.is_new==0){
                        var is_new = '<img src="images/no.svg"  width="20" class="change" is_new="'+v.is_new+'">';
                    }else{
                        var is_new = '<img src="images/yes.svg"  width="20" class="change" is_new="'+v.is_new+'">';
                    }
                    tr.append('<td>'+is_new+'</td>')
                    if(v.is_hot==0){
                        var is_hot = '<img src="images/no.svg"  width="20" class="change" is_hot="'+v.is_hot+'">';
                    }else{
                        var is_hot = '<img src="images/yes.svg"  width="20" class="change" is_hot="'+v.is_hot+'">';
                    }
                    tr.append(' <td>'+is_hot+'</td>')

                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.sort_order+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_number+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.virtual_sales+'</td>')
                    tr.append(' <td style="background-color: rgb(255, 255, 255);"> <a href="http://localhost/dayi/ecshop/ecshop/goods.php?id=72" target="_blank" title="查看">查看</a><a href="http://localhost/dayi/ecshop/ecshop/admin/goods.php?act=edit&amp;goods_id=72&amp;extension_code=" title="编辑">编辑</a><a href="http://localhost/dayi/ecshop/ecshop/admin/goods.php?act=copy&amp;goods_id=72&amp;extension_code=" title="复制">复制</a><a href="http://www.jodieme.cn/admin/goods/del?goods_id='+v.goods_id+'"  title="回收站">回收站</a></td>');

                    $('#goods_list').append(tr);
//
                })

            }
        })
    }

</script>



</body></html>